package net.togogo;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class ForwardServlet2 extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("ForwardServlet2----->doGET方法被调用");
        //接受来之余A窗口的请求
        //1：获取请求的参数 查询A窗口开的证明
        String name = request.getParameter("name");
        System.out.println("在B窗口核查A窗口给：" + name + "开具的证明信息");
        //核心A窗口的证明
        Object key1 = request.getAttribute("key1");
        System.out.println("核查A窗口开具的证明是否有章：" + key1);
        //B窗口开始处理业务
        System.out.println("B窗口帮助小明处理业务");
    }
}
